<template>
    <div class="xl-table-content">
    <xlTable
        :columns="columns"
        :dataSource="form.appliItemList"
        rowKey="policyItemId"
        :pagination="false"
        :confirmLoading="confirmLoading"
         @change="handleTableChange"
         bordered
        >
            <template v-slot:action="scope">
                <xluploadFile v-model="scope.record.policySubAppliPath" title="上传说明"></xluploadFile>
            </template>
            <template v-slot:download="scope">
                <a :href="scope.record.policySubAppliPath" target="_blank" v-if="scope.record.policySubAppliPath">查看文件</a>
                <span v-else>暂无文件</span>
            </template>
    </xlTable>
    </div>


</template>

<script>
    import xlMixin from '../../mixin/index'
    import xluploadFile from '../../formUntil/xluploadFile'

    export default {
        name: "index",
        mixins:[xlMixin],
        data(){
            return{
                columns:[
                    {
                        title: '兑现项目编号',
                        dataIndex: 'policy.policyItemNo',
                        type:'input'

                    },
                    {
                        title: '兑现项目标题',
                        dataIndex: 'policy.policyItemTitle',
                        type:'input'
                    },
                    {
                        title: '兑现金额',
                        dataIndex: 'policy.referOrgCode',
                        type:'input'
                    },
                    {
                        title: '政策参考信息',
                        dataIndex: 'policy.referPolicyIntro',
                        width:'250px',
                        type:'input'
                    },
                    {
                        title: '证明材料名称',
                        dataIndex: 'policy.referProveTitle',
                        type:'input'
                    },

                    // {
                    //     title: '是否兑现',
                    //     dataIndex: 'policySubAppliPath',
                    //     type:'input'
                    // },
                    // {
                    //     title: '状态',
                    //     dataIndex: 'policy.policyItemTitle',
                    //     type:'input'
                    // },

                    {
                        title: '操作',
                        dataIndex: 'action',
                        align: "center",
                        fixed: 'right',
                        width:'300px',
                        scopedSlots: {customRender: 'action'},
                    }
                ],
                confirmLoading:false,
                formatData:{}

            }
        },
        props:{
            form:{},
        },

        created(){
            this.formatMerge()
        },

        components: {
            xluploadFile
        },
        watch: {
            form() {

            }
        }

    }



</script>
